home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / amiexpress / source / ae / code / ax3.00 / commandsplit.c < prev    next >
Encoding:
C/C++ Source or Header  |  1980-01-03  |  499 b   |  35 lines

  1. #include "bbs.h"
  2.  
  3.  
  4. int CommandSplit()
  5. {
  6. int count,count2,x;
  7. char tempit[50];
  8.  
  9. for(x=0; x<6; x++)
  10.     {
  11.     Command[x][0]='\0';
  12.     }
  13.  
  14. x=0;
  15. count2=0;
  16. do
  17.     {
  18.     count=0;
  19.     do
  20.         {
  21.         tempit[count]=MAINMENU_Li[count2];
  22.         count+=1;
  23.         count2+=1;
  24.         } while(MAINMENU_Li[count2]!=' '&&MAINMENU_Li[count2]!='\0'&&count<38);
  25.     tempit[count]='\0';
  26.     count2+=1;
  27.     if(tempit[0]!=' '&&tempit[0]!='\0')
  28.         {
  29.         strcpy(Command[x],tempit);
  30.         x+=1;
  31.         }
  32.     } while(MAINMENU_Li[count2]!='\0'&&MAINMENU_Li[count2-1]!='\0'&&x<6);
  33. return(x);
  34. }
  35.